package com.yehongyu.mytools.basic.util.regex;

import org.apache.commons.lang.StringUtils;

public class RegexUtil {
	public static void main(String[] args){
		String tripDomainUrl="trip.taobao.com";
		String url = "http://jipiaadf.aao/.com.trip.taobao.com./";
		if(StringUtils.isBlank(url)) System.out.println("false1");
		if(url.indexOf(tripDomainUrl)<0) System.out.println("false2");
		String pre = url.substring(0, url.indexOf(tripDomainUrl));
		String pos = url.substring(url.indexOf(tripDomainUrl)+tripDomainUrl.length());
		if(!pre.matches("^((http|https){1})://((\\w*)(\\.))*")) System.out.println("false3");
		if(StringUtils.isNotBlank(pos)&&!pos.matches("/(.*)")) System.out.println("false4");
		System.out.println("true");
		System.out.println(String.format("mymessage", "args"));
		
	}
}
